package com.ofr.controller.common;

import com.ofr.util.Constants;

import javax.enterprise.context.RequestScoped;
import javax.faces.context.FacesContext;
import javax.inject.Named;
import javax.servlet.http.HttpSession;

/**
 * Created with IntelliJ IDEA.
 * User: imon
 * Date: 3/28/13
 * Time: 1:12 PM
 * To change this template use File | Settings | File Templates.
 */
@Named
@RequestScoped
public class logOutController implements Constants{

    public String logOut() {
        System.out.println("in log out");
        FacesContext context = FacesContext.getCurrentInstance();

        HttpSession httpSession = (HttpSession) context.getExternalContext().getSession(false);
        httpSession.invalidate();
        return LOG_OUT;
    }
}
